package com.hbnu.dataAccesss;

import org.springframework.jdbc.core.JdbcTemplate;

public class AccessService {
    private JdbcTemplate jdbcTemplate;

    public void transfer(Double money){
        String sql="update tb_account set account=account+? where username=?";
        //转账
        jdbcTemplate.update(sql,-1*money,"lishi");
        int a=1/0;
        jdbcTemplate.update(sql,money,"zhangsan");

    }
}
